Release 10.1A: OpenEdge Development:
Progress 4GL Reference
PUT-BITS statement
Uses the bit representation of an integer to set a given number of bits at a given location within another integer. Returns a logical value.
Syntax
destinationA Progress integer variable. The statement sets bits in
destinationthat correspond to the bits that are on in the source variable,expression. It clears bits in the destination variable that are 0 in the source variable. Note that the number of bits set or cleared is limited by thenumbitsparameter, and the location within the destination is determined by thepositionvariable.positionA variable or expression that returns an integer. This parameter designates the position of the lowest-order bit of the bits that are to be interpreted as an integer. Bits are numbered from 1 through the length of an integer; with 1 being the low-order bit. If
positionis greater than the length of an INTEGER or less than 1, Progress generates a runtime error.numbitsThe number of bits to examine when generating the return value. If
positionplusnumbitsis greater than the length of an integer plus 1, Progress generates a runtime error.expressionA source variable that returns an INTEGER. If the INTEGER cannot be represented in the number of bits specified by numbits, Progress stores the low-order numbits bits of the INTEGER.
See also
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |